#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void Fun(int a)
{
	int arr[50][50] = { 0 };
	for (int i = 1; i < a + 1; i++)
	{
		for (int j = 1; j <= i; j++)
		{
			if (i == 1)
			{
				arr[i][j] = 1;
			}
			else
			{
				arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
			}
		}
	}
	for (int i = 1; i < a + 1; i++)
	{
		for (int j = 1; j <= i; j++)
		{
			if (arr[i][j] != 0)
			{
				printf("%-5d ", arr[i][j]);
			}
		}
		printf("\n");
	}
}

int main()
{
	int n = 0;
	scanf("%d", &n);
	Fun(n);
	return 0;
}